#!/bin/bash
[ $# -eq 0 ] && echo "must be give a canshu" && exit
[ ! -d $1 ] && echo "the $1 is not a directory" && exit  
cd $1 || { echo "con't cd to the directory $1";exit 1; }
for filename in `ls`                       
do
	if [[ $filename != *[[:lower:]]* ]];then
		continue
	fi

	a=`echo ${filename%.*}`
	b=`echo ${filename#*.}`

	new=`echo $a | tr  'a-z'  'A-Z' `
	new=${new}"."${b}
	mv $filename $new
	echo "the $filename is rename to $new"

done

